// SafeRichEditCtrl.cpp : implementation file
//

#include "stdafx.h"
#include "ExamClient.h"
#include "SafeRichEditCtrl.h"


// CSafeRichEditCtrl

IMPLEMENT_DYNAMIC(CSafeRichEditCtrl, CRichEditCtrl)

CSafeRichEditCtrl::CSafeRichEditCtrl()
{

}

CSafeRichEditCtrl::~CSafeRichEditCtrl()
{
}


BEGIN_MESSAGE_MAP(CSafeRichEditCtrl, CRichEditCtrl)
END_MESSAGE_MAP()



// CSafeRichEditCtrl message handlers



BOOL CSafeRichEditCtrl::PreTranslateMessage(MSG* pMsg)
{
    // TODO: Add your specialized code here and/or call the base class
    if  (pMsg->message  ==  WM_KEYDOWN)  
    {
        if (pMsg->wParam == 'V' && GetKeyState(VK_CONTROL) < 0)
            return TRUE;

        if (pMsg->wParam == 'C' && GetKeyState(VK_CONTROL) < 0)
            return TRUE;

        if (pMsg->wParam == 'X' && GetKeyState(VK_CONTROL) < 0)
            return TRUE;

        if (pMsg->wParam == VK_INSERT && GetKeyState(VK_SHIFT) < 0) 
            return TRUE;

        if (pMsg->wParam == VK_INSERT && GetKeyState(VK_CONTROL) < 0) 
            return TRUE;

        if (pMsg->wParam == VK_INSERT && GetKeyState(VK_DELETE) < 0) 
            return TRUE;
    }

    return CRichEditCtrl::PreTranslateMessage(pMsg);
}
